<template>
  <div class="D9">
    <!-- 头 -->
    <div class="D9head">
      <router-link to="Invest">
        <img src="../assets/img/返回箭头.png" alt="" />
      </router-link>
      <span>我的定投</span>
    </div>
    <!-- 渲染的定投详情 -->
    <div
      v-for="(item, index) in DetailsInvestment"
      :key="index"
      class="D9Details"
    >
      <div class="D9Details1">
        <p>{{ item.fundName }}</p>
        <p>{{ item.fundId }}</p>
      </div>
      <div class="D9Details5">
        <p class="D9Details3">截止时间：{{ item.afterTime }}</p>
        <p class="D9Details2">每周{{ item.weekday }}定投</p>
      </div>
      <p class="D9Details4">每期定投金额：{{ item.money }}(元)</p>
    </div>
    <!-- 添加定投 -->
    <router-link to="BulkDensity">
      <div class="D9add">添加定投</div>
    </router-link>
  </div>
</template>

<script>
import { myaut } from "../api/MyAutomatic";
export default {
  data() {
    return {
      DetailsInvestment: [],
    };
  },
  methods: {
    fun() {
      myaut({}).then((res) => {
        if (res.code == 200) {
          this.DetailsInvestment = res.data;
        } else {
          Dialog({ title: "温馨提示", message: res.mag });
        }
      });
    },
  },
  created() {
    this.fun();
  },
};
</script>

<style src="../assets/css/MyAutomatic.css"></style>
